The present invention relates to an image processing system having the function of transforming multigradation image data into bigradation image data (binary-coding function) for the purpose of reducing the quantity of data, outputting the image data to a CRT display or a printer, and the like. More particularly, the present invention relates to an image binary-coding apparatus for binary-coding image data by using an error diffusion method, and an image input apparatus, an image processing apparatus and an image output apparatus, each of these apparatuses including the image binary-coding apparatus.
When multigradation image data is output to a printer or a display apparatus that does not have the function of pixel basis gradation control or when the quantity of data is to be reduced for storage and data transmission, a binary-coding process for reducing the number of gradations of each pixel to two gradations is widely used. There are a variety of binary-coding methods. Of these methods, the error diffusion method is popular because it can produce the image of the best quality.
The error diffusion method is based on "error diffusion" in which a quantitizing error caused during the process of binary-coding a pixel is distributed to its adjoining pixels that are not yet binary-coded, in accordance with their weights, without discarding the quantitizing error. Accordingly, a mean value of the binary-coding errors in a local image area is extremely small. The quality of the image produced by the error diffusion method is much higher than that produced by the systematic dither method, in which the binary-coding error is discarded. The error diffusion method produces an image of high resolution and is capable of realizing a continuous gradation reproduction. For the conventional method using the error diffusion method, reference is made to Published Unexamined Japanese Patent Application No. Hei. 1-284173, entitled "IMAGE PROCESSING METHOD AND APPARATUS FOR EXECUTING THE SAME".
In the distribution of the errors by the error diffusion method, a means describing "how to specify the adjoining pixels to which the errors are distributed and how to weight these specified adjoining pixels" is referred to as an "error diffusion matrix" The number of adjoining pixels to which the error is diffused is referred to as "matrix size". Some examples of the error diffusion matrices of the type in which the adjoining pixels are under a target pixel are shown in FIGS. 5(a) to 5(e). The matrix sizes of these error diffusion matrices are 2, 4, 7, 10, and 13, respectively. When the error diffusion matrix shown in FIG. 5(b) is used, a binary-coding error caused in the target pixel is quartered with an equal weight. These divided errors are respectively added to the gradation image data of its adjoining four pixels not yet binary-coded, a right pixel, a left under pixel, an under pixel, and a right under pixel.
In the error diffusion method, it is necessary to distribute the binary-coding error caused in the target pixel to its adjoining pixels not yet binary-coded by using any of the error diffusion matrices as shown in FIGS. 5(a) to 5(e). Therefore, the number of processing steps is remarkably increased in comparison to the systematic dither method. The time for the processing is also increased. The processing time and the number of processing steps are both increased as the size of the error diffusion matrix becomes large. Where a high processing speed is required, it is preferable to use an error diffusion matrix of small size.
Let us consider the error diffusion method from the standpoint of image quality. In a case where an error diffusion matrix of small size is used, for reducing the processing time, an error diffusion area is small. In this case, if a density of distributed dots that are formed by the binary-coding process is low, "a distribution of dots is not uniform, dots are nonuniformly strung out, and the quality of the resultant image is poor" For example, consider original image data of such a low density that after it is binary-coded, the ratio of the black dots to all of the dots is 10% or less. If such original image data is binary-coded by using the error diffusion matrix of small size (i.e., the error diffusion area is small), as shown in FIG. 5(a) or 5(b), the result of binary-coding the image data is as shown in FIG. 8(a). As shown, black dots are strung out and are nonuniformly spaced. The resultant image quality is poor. By using an error diffusion matrix of large size (which provides a large error diffusion area), e.g., as shown in FIG. 5(e), the image quality is improved, as shown in FIG. 8(b). However, when the error diffusion matrix of large size is used, the amount of processing and the processing time are increased as described before. Thus, the conventional error diffusion method cannot satisfy both the requirements for the image quality and the processing amount/time concurrently.